package com.gi.product.service.impl;

import com.gi.product.entity.ProductCategory;
import com.gi.product.entity.ProductInfo;
import com.gi.product.mapper.ProductCategoryMapper;
import com.gi.product.service.ProductCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ProductCategoryServiceImpl implements ProductCategoryService {

    @Autowired
    private ProductCategoryMapper productCategoryMapper;


    @Override
    public List<ProductCategory> findAllProductCategory() {
        return productCategoryMapper.findAllProductCategory();
    }

    /**
     * 使用集合的方式传递参数
     * @param categoryTypeList
     * @return
     */
    @Override
    public List<ProductCategory> findProductCategoryList(List<Integer> categoryTypeList) {
        return productCategoryMapper.findProductCategoryList(categoryTypeList);
    }

    /**
     * 使用map的方式传递参数
     * @param categoryTypeMap
     * @return
     */
    @Override
    public List<ProductCategory> findProductCategoryListByMap(Map<String, Object> categoryTypeMap) {
        return productCategoryMapper.findProductCategoryListByMap(categoryTypeMap);
    }
}
